#!/bin/bash

help() {
  echo "Usage:"
  echo "  zpackage reinstall <package>"
  echo ""
}

core() {
  if [ "$1" = "-h" ] || [ "$1" = "--help" ]; then
    help
    exit 0
  fi
  
  local name=$1
  if [ -z "$name" ]; then
    log::error "package name is requried"
    exit 1
  fi

  zpackage::run reinstall $name
}

run() {
  core $@
}

run $@
